using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Dal.Models.Mapping;

namespace Dal.Models
{
    public class MessageContext : DbContext
    {
        static MessageContext()
        {
            Database.SetInitializer<MessageContext>(null);
        }

		public MessageContext()
			: base("Name=MessageContext")
		{
		}

        public DbSet<CHACTOR> CHACTORs { get; set; }
        public DbSet<MEET> MEETs { get; set; }
        public DbSet<MEETLIST> MEETLISTs { get; set; }
        public DbSet<RECIEVE> RECIEVEs { get; set; }
        public DbSet<SEND> SENDs { get; set; }
        public DbSet<SETNUM> SETNUMs { get; set; }
        public DbSet<WAIT> WAITs { get; set; }
        public DbSet<WAITTEMP> WAITTEMPs { get; set; }
        public DbSet<User> Users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CHACTORMap());
            modelBuilder.Configurations.Add(new MEETMap());
            modelBuilder.Configurations.Add(new MEETLISTMap());
            modelBuilder.Configurations.Add(new RECIEVEMap());
            modelBuilder.Configurations.Add(new SENDMap());
            modelBuilder.Configurations.Add(new SETNUMMap());
            modelBuilder.Configurations.Add(new WAITMap());
            modelBuilder.Configurations.Add(new WAITTEMPMap());
            modelBuilder.Configurations.Add(new UserMap());
        }
    }
}
